<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BBody</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BBody">
			<h1>BBody</h1>
			<p>继承自<a href="BNode.html">BNode</a></p>
			<p id="resume">BBody类为场景中的物理节点，其包含的形状参与碰撞检测，质量、重力加速度等等属性影响其运动。<a href="#desc">详细</a></p><h2>public</h2>
			<div id="public">
				<h3>enum State</h3>
				<table class="enum">
					<tr><td>State_Active</td><td>desc</td></tr>
					<tr><td>State_Sleeping</td><td>desc</td></tr>
					<tr><td>State_Deactivating</td><td>desc</td></tr>
					<tr><td/><td>desc</td></tr>
				</table>
			</div>
			<h2>public</h2>
			<table id="public">
				<tr><td align="right"/><td><a href="#BBody()">BBody</a>();</td></tr>
				<tr><td align="right"/><td><a href="#BBody(const BString&)">BBody</a>(const BString&amp; name);</td></tr>
				<tr><td align="right"/><td><a href="#~BBody()">~BBody</a>();</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#copy(const BNode*)">copy</a>(const BNode* other);</td></tr>
				<tr><td align="right">virtual BNode* </td><td><a href="#clone() const">clone</a>() const;</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#insertShape(BShape*)">insertShape</a>(BShape* shape);</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#removeShape(BShape*)">removeShape</a>(BShape* shape);</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#clearShapes()">clearShapes</a>();</td></tr>
				<tr><td align="right">bool </td><td><a href="#setState(BBody::State) const">setState</a>(BBody::State state) const;</td></tr>
				<tr><td align="right">BBody::State </td><td><a href="#state() const">state</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setDeactivatedTime(BReal)">setDeactivatedTime</a>(BReal time);</td></tr>
				<tr><td align="right">BReal </td><td><a href="#deactivatedTime() const">deactivatedTime</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setContinuous(bool)">setContinuous</a>(bool continuous);</td></tr>
				<tr><td align="right">bool </td><td><a href="#continuous() const">continuous</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setKinematic(bool)">setKinematic</a>(bool kinematic);</td></tr>
				<tr><td align="right">bool </td><td><a href="#kinematic() const">kinematic</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#activate() const">activate</a>() const;</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#setMass(BReal)">setMass</a>(BReal mass);</td></tr>
				<tr><td align="right">BReal </td><td><a href="#mass() const">mass</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setInertia(BReal, BReal, BReal)">setInertia</a>(BReal ix, BReal iy, BReal iz);</td></tr>
				<tr><td align="right">void </td><td><a href="#setInertia(const BVector&)">setInertia</a>(const BVector&amp; inertia);</td></tr>
				<tr><td align="right">const BVector&amp; </td><td><a href="#inertia() const">inertia</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setGravity(BReal, BReal, BReal)">setGravity</a>(BReal gx, BReal gy, BReal gz);</td></tr>
				<tr><td align="right">void </td><td><a href="#setGravity(const BVector&)">setGravity</a>(const BVector&amp; gravity);</td></tr>
				<tr><td align="right">const BVector&amp; </td><td><a href="#gravity() const">gravity</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setRestitution(BReal)">setRestitution</a>(BReal restitution);</td></tr>
				<tr><td align="right">BReal </td><td><a href="#restitution() const">restitution</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setFriction(BReal)">setFriction</a>(BReal friction);</td></tr>
				<tr><td align="right">BReal </td><td><a href="#friction() const">friction</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setRollingFriction(BReal)">setRollingFriction</a>(BReal friction);</td></tr>
				<tr><td align="right">BReal </td><td><a href="#rollingFriction() const">rollingFriction</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setSpinningFriction(BReal)">setSpinningFriction</a>(BReal friction);</td></tr>
				<tr><td align="right">BReal </td><td><a href="#spinningFriction() const">spinningFriction</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setForce(BReal, BReal, BReal)">setForce</a>(BReal fx, BReal fy, BReal fz);</td></tr>
				<tr><td align="right">void </td><td><a href="#setForce(const BVector&)">setForce</a>(const BVector&amp; force);</td></tr>
				<tr><td align="right">const BVector&amp; </td><td><a href="#force() const">force</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setTorque(BReal, BReal, BReal)">setTorque</a>(BReal tx, BReal ty, BReal tz);</td></tr>
				<tr><td align="right">void </td><td><a href="#setTorque(const BVector&)">setTorque</a>(const BVector&amp; torque);</td></tr>
				<tr><td align="right">const BVector&amp; </td><td><a href="#torque() const">torque</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setLinearVelocity(const BVector&)">setLinearVelocity</a>(const BVector&amp; linearVelocity);</td></tr>
				<tr><td align="right">const BVector&amp; </td><td><a href="#linearVelocity() const">linearVelocity</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setAngularVelocity(const BVector&)">setAngularVelocity</a>(const BVector&amp; angularVelocity);</td></tr>
				<tr><td align="right">const BVector&amp; </td><td><a href="#angularVelocity() const">angularVelocity</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setLinearThreshold(BReal)">setLinearThreshold</a>(BReal linearSleepingThreshold);</td></tr>
				<tr><td align="right">BReal </td><td><a href="#linearThreshold() const">linearThreshold</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setAngularThreshold(BReal)">setAngularThreshold</a>(BReal angularSleepingThreshold);</td></tr>
				<tr><td align="right">BReal </td><td><a href="#angularThreshold() const">angularThreshold</a>() const;</td></tr>
				<tr><td align="right">BVector </td><td><a href="#totalForce() const">totalForce</a>() const;</td></tr>
				<tr><td align="right">BVector </td><td><a href="#totalTorque() const">totalTorque</a>() const;</td></tr>
				<tr><td align="right">BVector </td><td><a href="#velocityInPoint(const BVector&) const">velocityInPoint</a>(const BVector&amp; point) const;</td></tr>
				<tr><td align="right">void </td><td><a href="#applyImpulse(const BVector&, const BVector&)">applyImpulse</a>(const BVector&amp; impulse, const BVector&amp; point);</td></tr>
				<tr><td align="right">void </td><td><a href="#applyPushImpulse(const BVector&, const BVector&)">applyPushImpulse</a>(const BVector&amp; impulse, const BVector&amp; point);</td></tr>
				<tr><td align="right">void </td><td><a href="#applyCentralImpulse(const BVector&)">applyCentralImpulse</a>(const BVector&amp; impulse);</td></tr>
				<tr><td align="right">void </td><td><a href="#applyTorqueImpulse(const BVector&)">applyTorqueImpulse</a>(const BVector&amp; torque);</td></tr>
				<tr><td align="right">void </td><td><a href="#applyCentralPushImpulse(const BVector&)">applyCentralPushImpulse</a>(const BVector&amp; impulse);</td></tr>
				<tr><td align="right">void </td><td><a href="#applyTorqueTurnImpulse(const BVector&)">applyTorqueTurnImpulse</a>(const BVector&amp; torque);</td></tr>
				<tr><td align="right">bool </td><td><a href="#restrained(BRestraint*)">restrained</a>(BRestraint* restraint);</td></tr>
				<tr><td align="right">int </td><td><a href="#restraintCount() const">restraintCount</a>() const;</td></tr>
				<tr><td align="right">BRestraint* </td><td><a href="#restraint(int)">restraint</a>(int index);</td></tr>
				<tr><td align="right">const BRestraint* </td><td><a href="#restraint(int) const">restraint</a>(int index) const;</td></tr>
				<tr><td align="right">BRestraint* </td><td><a href="#restraintWith(const BBody*)">restraintWith</a>(const BBody* other);</td></tr>
				<tr><td align="right">const BRestraint* </td><td><a href="#restraintWith(const BBody*) const">restraintWith</a>(const BBody* other) const;</td></tr>
				<tr><td align="right">BRestraint* </td><td><a href="#namedRestraint(const BString&)">namedRestraint</a>(const BString&amp; name);</td></tr>
				<tr><td align="right">const BRestraint* </td><td><a href="#namedRestraint(const BString&) const">namedRestraint</a>(const BString&amp; name) const;</td></tr>
				<tr><td align="right">using </td><td><a href="#BNode::space;()">BNode::space;</a></td></tr>
				<tr><td align="right">BSpace </td><td><a href="#space(const BMatrix&) const">space</a>(const BMatrix&amp; matrix) const;</td></tr>
				<tr><td align="right">using </td><td><a href="#BNode::query;()">BNode::query;</a></td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#query(const BString&, BValue&) const">query</a>(const BString&amp; text, BValue&amp; value) const;</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#contact(BContact&)">contact</a>(BContact&amp; contact);</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2>
				<p>BBody类为场景中的物理节点，其包含的形状参与碰撞检测，质量、重力加速度等等属性影响其运动。</p>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BBody()">
				<h3>BBody();</h3>
			</div>
			<div id="BBody(const BString&)">
				<h3>BBody(const BString&amp; name);</h3>
			</div>
			<div id="~BBody()">
				<h3>~BBody();</h3>
			</div>
			<div id="copy(const BNode*)">
				<h3>virtual void copy(const BNode* other);</h3>
			</div>
			<div id="clone() const">
				<h3>virtual BNode* clone() const;</h3>
			</div>
			<div id="insertShape(BShape*)">
				<h3>virtual bool insertShape(BShape* shape);</h3>
			</div>
			<div id="removeShape(BShape*)">
				<h3>virtual bool removeShape(BShape* shape);</h3>
			</div>
			<div id="clearShapes()">
				<h3>virtual bool clearShapes();</h3>
			</div>
			<div id="setState(BBody::State) const">
				<h3>bool setState(BBody::State state) const;</h3>
				<p>切换物体的状态，共有三种状态，活跃状态，减活状态，睡眠状态。切换成功后返回true，否则返回false。</p>
			</div>
			<div id="state() const">
				<h3>BBody::State state() const;</h3>
			</div>
			<div id="setDeactivatedTime(BReal)">
				<h3>void setDeactivatedTime(BReal time);</h3>
				<p>设置减活时长，默认为2秒。当物体的位移速度和旋转速度小于阈值时开始减活计时，如果达到此减活时长时则物体状态转变为睡眠状态。</p>
			</div>
			<div id="deactivatedTime() const">
				<h3>BReal deactivatedTime() const;</h3>
				<p>获得减活时长，默认为2秒。</p>
			</div>
			<div id="setContinuous(bool)">
				<h3>void setContinuous(bool continuous);</h3>
			</div>
			<div id="continuous() const">
				<h3>bool continuous() const;</h3>
			</div>
			<div id="setKinematic(bool)">
				<h3>bool setKinematic(bool kinematic);</h3>
			</div>
			<div id="kinematic() const">
				<h3>bool kinematic() const;</h3>
			</div>
			<div id="activate() const">
				<h3>void activate() const;</h3>
			</div>
			<div id="setMass(BReal)">
				<h3>virtual void setMass(BReal mass);</h3>
			</div>
			<div id="mass() const">
				<h3>BReal mass() const;</h3>
			</div>
			<div id="setInertia(BReal, BReal, BReal)">
				<h3>void setInertia(BReal ix, BReal iy, BReal iz);</h3>
			</div>
			<div id="setInertia(const BVector&)">
				<h3>void setInertia(const BVector&amp; inertia);</h3>
			</div>
			<div id="inertia() const">
				<h3>const BVector&amp; inertia() const;</h3>
			</div>
			<div id="setGravity(BReal, BReal, BReal)">
				<h3>void setGravity(BReal gx, BReal gy, BReal gz);</h3>
			</div>
			<div id="setGravity(const BVector&)">
				<h3>void setGravity(const BVector&amp; gravity);</h3>
			</div>
			<div id="gravity() const">
				<h3>const BVector&amp; gravity() const;</h3>
			</div>
			<div id="setRestitution(BReal)">
				<h3>void setRestitution(BReal restitution);</h3>
			</div>
			<div id="restitution() const">
				<h3>BReal restitution() const;</h3>
			</div>
			<div id="setFriction(BReal)">
				<h3>void setFriction(BReal friction);</h3>
			</div>
			<div id="friction() const">
				<h3>BReal friction() const;</h3>
			</div>
			<div id="setRollingFriction(BReal)">
				<h3>void setRollingFriction(BReal friction);</h3>
			</div>
			<div id="rollingFriction() const">
				<h3>BReal rollingFriction() const;</h3>
			</div>
			<div id="setSpinningFriction(BReal)">
				<h3>void setSpinningFriction(BReal friction);</h3>
			</div>
			<div id="spinningFriction() const">
				<h3>BReal spinningFriction() const;</h3>
			</div>
			<div id="setForce(BReal, BReal, BReal)">
				<h3>void setForce(BReal fx, BReal fy, BReal fz);</h3>
			</div>
			<div id="setForce(const BVector&)">
				<h3>void setForce(const BVector&amp; force);</h3>
			</div>
			<div id="force() const">
				<h3>const BVector&amp; force() const;</h3>
			</div>
			<div id="setTorque(BReal, BReal, BReal)">
				<h3>void setTorque(BReal tx, BReal ty, BReal tz);</h3>
			</div>
			<div id="setTorque(const BVector&)">
				<h3>void setTorque(const BVector&amp; torque);</h3>
			</div>
			<div id="torque() const">
				<h3>const BVector&amp; torque() const;</h3>
			</div>
			<div id="setLinearVelocity(const BVector&)">
				<h3>void setLinearVelocity(const BVector&amp; linearVelocity);</h3>
			</div>
			<div id="linearVelocity() const">
				<h3>const BVector&amp; linearVelocity() const;</h3>
			</div>
			<div id="setAngularVelocity(const BVector&)">
				<h3>void setAngularVelocity(const BVector&amp; angularVelocity);</h3>
			</div>
			<div id="angularVelocity() const">
				<h3>const BVector&amp; angularVelocity() const;</h3>
			</div>
			<div id="setLinearThreshold(BReal)">
				<h3>void setLinearThreshold(BReal linearSleepingThreshold);</h3>
				<p>设置线性速度阈值，当位移速度小于此值时则判断此物体的位移太小而不应用。默认值为0.01。</p>
			</div>
			<div id="linearThreshold() const">
				<h3>BReal linearThreshold() const;</h3>
				<p>获得线性阈值。</p>
			</div>
			<div id="setAngularThreshold(BReal)">
				<h3>void setAngularThreshold(BReal angularSleepingThreshold);</h3>
				<p>设置旋转速度阈值，当旋转速度小于此值时则判断此物体的旋转太小而不应用。默认值为0.01。</p>
			</div>
			<div id="angularThreshold() const">
				<h3>BReal angularThreshold() const;</h3>
				<p>获得旋转速度阈值。</p>
			</div>
			<div id="totalForce() const">
				<h3>BVector totalForce() const;</h3>
			</div>
			<div id="totalTorque() const">
				<h3>BVector totalTorque() const;</h3>
			</div>
			<div id="velocityInPoint(const BVector&) const">
				<h3>BVector velocityInPoint(const BVector&amp; point) const;</h3>
				<p>计算此物体的某个位置的推进瞬时速度，向量point值应当是基于此物体的原点。</p>
			</div>
			<div id="applyImpulse(const BVector&, const BVector&)">
				<h3>void applyImpulse(const BVector&amp; impulse, const BVector&amp; point);</h3>
			</div>
			<div id="applyPushImpulse(const BVector&, const BVector&)">
				<h3>void applyPushImpulse(const BVector&amp; impulse, const BVector&amp; point);</h3>
			</div>
			<div id="applyCentralImpulse(const BVector&)">
				<h3>void applyCentralImpulse(const BVector&amp; impulse);</h3>
			</div>
			<div id="applyTorqueImpulse(const BVector&)">
				<h3>void applyTorqueImpulse(const BVector&amp; torque);</h3>
			</div>
			<div id="applyCentralPushImpulse(const BVector&)">
				<h3>void applyCentralPushImpulse(const BVector&amp; impulse);</h3>
			</div>
			<div id="applyTorqueTurnImpulse(const BVector&)">
				<h3>void applyTorqueTurnImpulse(const BVector&amp; torque);</h3>
			</div>
			<div id="restrained(BRestraint*)">
				<h3>bool restrained(BRestraint* restraint);</h3><p>判断此物体是否被指定的约束器restraint约束。</p>
			</div>
			<div id="restraintCount() const">
				<h3>int restraintCount() const;</h3>
				<p>取得此物体参与的约束器的数量。</p>
			</div>
			<div id="restraint(int)">
				<h3>BRestraint* restraint(int index);</h3>
				<p>取得index索引位置的约束器。</p>
			</div>
			<div id="restraint(int) const">
				<h3>const BRestraint* restraint(int index) const;</h3>
				<p>取得index索引位置的常量约束器。</p>
			</div>
			<div id="restraintWith(const BBody*)">
				<h3>BRestraint* restraintWith(const BBody* other);</h3>
				<p>取得此物体与另一个物体相关联的约束器。当相关联的约束器数量大于时只给出第一个约束器。</p>
			</div>
			<div id="restraintWith(const BBody*) const">
				<h3>const BRestraint* restraintWith(const BBody* other) const;</h3>
				<p>取得此物体与另一个物体相关联的约束器。当相关联的约束器数量大于时只给出第一个约束器。</p>
			</div>
			<div id="namedRestraint(const BString&)">
				<h3>BRestraint* namedRestraint(const BString&amp; name);</h3>
				<p>取得此物体应用的约束器中名称为name的约束器。</p>
			</div>
			<div id="namedRestraint(const BString&) const">
				<h3>const BRestraint* namedRestraint(const BString&amp; name) const;</h3>
				<p>取得此物体应用的约束器中名称为name的约束器。</p>
			</div>
			<div id="BNode::space;()">
				<h3>using BNode::space;</h3>
			</div>
			<div id="space(const BMatrix&) const">
				<h3>BSpace space(const BMatrix&amp; matrix) const;</h3>
			</div>
			<div id="BNode::query;()">
				<h3>using BNode::query;</h3>
			</div>
			<div id="query(const BString&, BValue&) const">
				<h3>virtual bool query(const BString&amp; text, BValue&amp; value) const;</h3>
			</div>
			<div id="contact(BContact&)">
				<h3>virtual bool contact(BContact&amp; contact);</h3>
			</div>
		</div>
	</body>
</html>